home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / rbbs_pc / newu173c.zip / RSB4NEWU.MRG < prev   
Text File  |  1992-03-26  |  2KB  |  48 lines

  1. * ------------[ BLED merge (c) Ken Goosens ]------------
  2. * Merge this against RBBSSUB4.BAS to produce RBBSSUB4.NEW
  3. * RBBSSUB4.BAS: Date 9-1-1991  Size 123727 bytes
  4. * ------------[ Created 1-25-92 11:59:14 ]------------
  5. * REPLACING old lines(s) by new
  6.  
  7. 59698 ' $SUBTITLE: 'MsgImport -- subroutine to import a message'
  8. ' $PAGE
  9. '
  10. '  NAME    -- MsgImport
  11. '
  12. '  INPUTS  --   PARAMETER     MEANING
  13. '               MaxLines     MAXIMUM # OF LINES
  14. '               MaxLen       MAXIMUM LENGTH OF A LINE
  15. '               NumLines     NUMBER OF LINES ALREADY IN MESSAGE
  16. '               LineAra$     ARRAY OF LINES IN MESSAGE
  17. '
  18. '  OUTPUTS --   NumLines
  19. '               LineAra$
  20. '
  21. '  PURPOSE -- Allows local user to append a text file to
  22. '             a message.   Will word wrap if needed.
  23. '
  24.       SUB MsgImport (MaxLines,MaxLen,NumLines,LineAra$(1)) STATIC
  25.       IF ZWelcomeAboard THEN _                                       ' RM032401
  26.          ZUserIn$ = "WELCOME.DEF" : _                                ' RM032401
  27.          GOTO 59701                                                  ' RM032401
  28.       IF NOT (ZLocalUser OR ZSysop) THEN _
  29.          CALL QuickTPut1 ("Sorry, Only for SysOps or Local Logons.") : _ ' TC090101
  30.          EXIT SUB
  31. 59700 ZOutTxt$ = "Import What Text File" + ZPressEnter$              ' TC090101
  32.       CALL PopCmdStack
  33.       IF ZSubParm = -1 OR ZWasQ = 0 THEN _
  34.          EXIT SUB
  35.       CALL FindIt (ZUserIn$(ZAnsIndex))
  36.       IF NOT ZOK THEN _
  37.          CALL QuickTPut1 (ZUserIn$(ZAnsIndex) + " Not Found.") : _   ' TC090101
  38.          GOTO 59700
  39. 59701 IF ZWelcomeAboard THEN _                                       ' RM032401
  40.          CALL FindIt (ZUserIn$)                                      ' RM032401
  41.       WHILE NOT EOF(2) AND NumLines < MaxLines
  42.          NumLines = NumLines + 1
  43.          LINE INPUT #2,LineAra$(NumLines)
  44.       WEND
  45.       CLOSE 2
  46.       CALL WordWrap (MaxLen,NumLines,LineAra$())
  47.       END SUB
  48.